<?php
/**
 * Created by PhpStorm.
 * User: dell
 * Date: 2018/4/30
 * Time: 15:44
 */
namespace app\api\controller\v1;
use org\Verify;
class User extends Base
{
    public function _initialize(){
        parent::_initialize();
    }

    /**
     * 用户名密码注册
     * @return mixed
     */
    public function reg(){
        if($this->request->isPost()){
            $param = input('post.');
            $res = model('User')->regUser($param);
            return $res;

        }
    }


    public function login(){
        if($this->request->isPost()){
            $param = input('post.');
            $res = model('User')->login($param);
            return $res;
        }
    }

    /*
    /**
     * 生成验证码
     * @return mixed
     */
    /*
    public function makeCode(){
        $verify = new Verify();
        $verify->imageH = 32;
        $verify->imageW = 100;
        $verify->length = 4;
        $verify->useNoise = false;
        $verify->fontSize = 14;
        return $verify->entry();
    }
    */
}